package vip.xumy.admin.um.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("page")
public class PageController {

	@RequestMapping("{page}")
	public String toPage(@PathVariable("page") String page) {
		return page;
	}

	@RequestMapping("{path}/{page}")
	public String toPathPage(@PathVariable("path") String path, @PathVariable("page") String page) {
		return path + "/" + page;
	}

	@RequestMapping("{path1}/{path2}/{page}")
	public String toDoublePathPage(@PathVariable("path1") String path1, @PathVariable("path2") String path2,
			@PathVariable("page") String page) {
		return path1 + "/" + path2 + "/" + page;
	}

	@RequestMapping("adapter/{page}")
	public String toPageAdapter(@PathVariable("page") String page) {
		return page;
	}

	@RequestMapping("adapter/{path}/{page}")
	public String toPathPageAdapter(@PathVariable("path") String path, @PathVariable("page") String page) {
		return path + "/" + page;
	}

	@RequestMapping("adapter/{path1}/{path2}/{page}")
	public String toDoublePathPageAdapter(@PathVariable("path1") String path1, @PathVariable("path2") String path2,
			@PathVariable("page") String page) {
		return path1 + "/" + path2 + "/" + page;
	}

}
